7b5ed2a650dea754f31c71c26c1a6546830a342e,src/sql/lang/Table.java,Table,getSchemaType,#,215

Before Change


    // return the schema type of a table.
    public List<ValType> getSchemaType() {
        List<ValType> lv = new ArrayList<ValType>();
        for (Value v : this.getContent().get(0).getValues()) {
            lv.add(v.getValType());
        }
        return lv;

After Change


    // return the schema type of a table.
    public List<ValType> getSchemaType() {

        if (this.storedSchemaType != null) return this.storedSchemaType;

        List<List<ValType>> typeCollections = new ArrayList<>();
        for (int i = 0; i < this.getSchema().size(); i ++) {
            typeCollections.add(new ArrayList<>());
        }
        for (int i = 0; i < this.getContent().size(); i ++) {
            int j = 0;
            for (Value v : this.getContent().get(i).getValues()) {
                typeCollections.get(j).add(v.getValType());